function showText()
{
    let container = document.querySelector(".container");
    let childs = container.children;//获取container的子元素列表
    if (childs.length > 6)
    {
        container.removeChild(container.lastElementChild)//删除之前新增的子元素
    }


    //创建新的div标签
    let newDiv = document.createElement("div");
    newDiv.className = "box";//标签类名
    //填充div内容
    let edits = document.querySelectorAll(".edit");
    let sour = edits[0].value;
    let dest = edits[1].value;
    let msg = edits[2].value;
    newDiv.innerText = sour + "对" + dest + "说：" + msg;
    //将新的div插入到container中
    
    container.appendChild(newDiv);
}